package com.itheima.demo02;

import com.itheima.demo01.Phone;

public class TeacherTest {
    public static void main(String[] args) {
        //空参构造
        //1. 创建类的对象.
        Teacher liuLi = new Teacher();
        //2. 给属性赋值
        liuLi.setName("刘立");
        liuLi.setAge(33);
        liuLi.setContent("Java基础中面向对象的知识........");
        //3. 打印属性值
        System.out.println("姓名:" + liuLi.getName() + "年龄" + liuLi.getAge() + "讲课内容" + liuLi.getContent());
        //4. 调用成员方法
        liuLi.eat();
        liuLi.teach();
        System.out.println("-------------------------");

        //全参构造
        //1. 创建对象
        Teacher liuLi2 = new Teacher("刘立", 33, "Java基础中面向对象的知识........");
        //2. 打印属性.
        System.out.println("姓名:" + liuLi2.getName() + "年龄" + liuLi2.getAge() + "讲课内容" + liuLi2.getContent());
        //3. 调用方法
        liuLi2.eat();
        liuLi2.teach();
    }

}
